package com.yml.mall.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ResponseEnum {
    ERROR(-1,"未知错误"),
    SUCCESS(0,"成功"),
    USERNAME_EXIST(1,"用户名已经存在"),
    EMAIL_EXIST(2,"邮箱已存在"),
    FIELD_ERROR(3,"请求字段错误"),
    PATH_PARAM_ERROR(4,"路径参数有误"),
    OBJECT_ERROR(5,"请求对象错误"),
    INSERT_ERROR(6,"数据库插入错误"),
    UPDATE_ERROR(7,"数据库更新错误"),
    DELETE_ERROR(8,"数据库删除错误"),
    DATA_NOT_EXIST(9,"数据不存在"),
    UserName_Or_PASSWORD_ERROR(10,"用户名或者密码错误"),
    NOT_LOGIN(11,"未登录或者登录超时"),
    USER_NOT_EXIST(12,"用户不存在"),
    USER_INFO_ERROR(13,"用户信息有误"),
    REQUEST_ERROR(20,"请求错误"),
    SALE_OFF_OR_DELETE(30,"商品下架或者删除"),
    SALE_NOT_EXIST(31,"商品不存在"),
    SALE_NOT_ENOUGH(32,"商品库存不足"),


    ;


    Integer code;
    String desc;

}
